Count data stochastic frontier models, with an application to the patents–R&D relationship