Fixed up some code in the utils.check_study_count to allow for specifying which reference dictionary one wishes to use