def count_pockets(filepath,pdbid):
    """Counts the number of pockets found by fpocket."""
    pocket_count = 0
    pocket_file = open(filepath+pdbid+'_out/'+pdbid+'_info.txt')
    for line in pocket_file:
        if line[:6] == 'Pocket':
            pocket_count += 1
    pocket_file.close()
    return pocket_count