Added count func