--Get count of Figures avaailable for each Procedure set
select FolderName, AA.ROFSTID, Count(FF.ROFSTID) HowMany from associations AA
JOIN VEFN_GetVersionNames() VN ON AA.VersionID = VN.VersionID
Join ROFSTs RF ON RF.ROFSTID = AA.ROFSTID
left Join Figures FF on FF.ROFSTID = AA.ROFSTID
group by foldername, AA.ROFSTID

--Get count of figures associated with each ROFST
Select RF.ROFSTID, RF.DTS,COunt(FF.ROFSTID) HowMany From ROFSTs RF Left Join Figures FF ON FF.ROfstID = RF.ROFSTID Group BY RF.ROFSTID, RF.DTS