import pickle


def readcounts(cfile, silent=False):
    """
    Read from disk the **counts** dictionary generated by the main counting 
    routines.
    
    .. rubric:: Parameters
    
    cfile : string
        Filepath for the counts (.cnt) file
    silent : bool
        If False, print a status message indicating the file was read. Default=False

    .. rubric:: Returns
    
    counts : Munch dictionary
        The counts object
    """

    with open(cfile, 'rb') as f:
        cnt = pickle.load(f)
        if silent is False: print('Counts object read from:',cfile)
    return cnt