tcaswell が提供したコンテキストに基づいて、メイン コードにいくつかのエラーがあります。
a を次のように仮定chrome.pyします。
class Chrome:
    directory = ""
    def __init__(self, directory):
        self.directory = directory
    def numberOfFiles(self):
        return len(os.listdir(self.directory))
それを呼び出して の結果を出力するにはnumberOfFiles、次のようにします。
ファイル:q_14938600.py
import os
from chrome import Chrome
from Tkinter import *
class App(object):
    """Basic TK App."""
    def __init__(self, parent):
        f = Frame(parent)
        f.pack(padx=15, pady=15)
        # Here I initiate the Chrome class, and set its directory. I'm using os.getcwd() as an example.
        self.ch = Chrome(os.getcwd())
        # Here I tell the button what to call when clicked. Note I'm NOT passing arguments to the function, just a reference.
        button = Button(f, text='Count Files', command=self.printFileCount)
        button.pack(side=BOTTOM)
    def printFileCount(self):
        # And here, I print the output of ch.numberOfFiles, which was defined in the Chrome class
        print(self.ch.numberOfFiles())
if __name__ == "__main__":
    # This is just standard app stuff
    root = Tk()
    root.title('q_14938600')
    app = App(root)
    root.mainloop()