added missing implementation for fetchCountOfExistingLoans