made changes in fetch methods in qieries and collection and added count method on queries and collection