Python code that compares two files byte by byte
The code in the post calls os.path.getsize for each block read from the two files. This could be avoided by remembering the value in a local variable.
The code accumulates count in order to detect the end of the files being compared. But the read method will return an empty bytes object when the end of file is reached, so there is no need to maintain a count.

If you look at the implementation of the filecmp module, you'll see that file comparison is implemented like this:

def _do_cmp(f1, f2):
    bufsize = BUFSIZE
    with open(f1, 'rb') as fp1, open(f2, 'rb') as fp2:
        while True:
            b1 = fp1.read(bufsize)
            b2 = fp2.read(bufsize)
            if b1 != b2:
                return False
            if not b1:
                return True