Refactor how the count is incremented, use a smarter prepared statement