1. A non-transitory computer-readable medium including instructions that, when executed by a computer, cause the computer to perform operations comprising: obtaining a functionality description of a special purpose hardware element of a target device, the target device including both the special purpose hardware element and a plurality of general purpose hardware elements; evaluating an arrangement of relationally connected operators, based on the functionality description of the special purpose hardware element, to determine if the arrangement can be mapped to the special purpose hardware element; and mapping a portion in the arrangement of relationally connected operators to the special purpose hardware element, in response to determining that the arrangement of relationally connected operators can be mapped to the special purpose hardware element; wherein the special purpose hardware element is a counter, and wherein the special purpose hardware element provides a single element implementation of a counting function that can be performed by the plurality of general purpose hardware elements in the target device.