Using aesara tensor as indices

The only addition is to ensure that count is 1 or more otherwise it returns inf