Adding frequency count fn