Money counters aren't illegal and they are typically purchased by companies doing legitimate financial transactions. The DEA however worked under the assumption that if an individual wanted to purchase a machine, it was likely they were involved in money laundering or drug dealing. To try to catch these supposed criminals, the DEA issued wide ranging subpoenas to the manufacturers of such machines and collected the data in a database.
A publicly released report by the Office of the Inspector General outlines the DEA's use of such programs. Sections of the report are redacted, but a key section was mistakenly left uncensored. This inadvertent leak was first spotted by Twitter user Sarah St. Vincent.
The report addresses three programs, #2 of which involved the DEA warrantlessly hoovering up records of people's purchases of a particular item. Most mentions of that item are redacted, but on p. 64 of the report there's a reference to "money counters"— Sarah St.Vincent (@SarahStV_HRW) March 29, 2019
The DEA hid this information from the courts and others because they believed "criminals would obtain money counters by other means if they knew that the DEA collected this data." The agents "were instructed to state in reports [...] that they received a lead from a source of information that indicated that the [suspect] may be involved in drug trafficking and money laundering."
In the report, all other mentions of "money counters" were supposed to be redacted but this paragraph was left in. The report goes on to describe field officers' complaints about how the program was generating too many false-positives to be a useful tool. The DEA later refined the program and was able to successfully make arrests and seize the illegal cash.
The program was never subject to scrutiny by the courts because the DEA hid it from them. When the DEA wanted to act on a lead generated by the program, they would use Parallel Construction. This is a technique of first obtaining the information you want using questionable tactics, and then requesting a targeted subpoena to re-obtain it legally.
The New York Times reached out to both the DEA and OIG but neither would comment.