Fixed IDBIndex count returning always zero