direct MDB access for counting entries from Python