added more changes on collection count issue