import glob


def count_traj_files(path, extension):
    """
    path : string
        Path of directory containing trajectory files.
    extension : string
        File extension type for trajectory files.
        EX) 'dcd', 'xtc', ...
    """
    return len(glob.glob1(path,"*."+extension))