fix project count check