Update CountFunction