A receipt from a Bethesda Safeway showing the charge for 12 disposable shopping bags. While fewer bags are being trapped near waterways, revenue from the disposable bag tax has crept up. (Katherine Frey/THE WASHINGTON POST)

Like most local governments, Montgomery County is perennially looking for ways to generate revenue. When it imposed a 5-cent levy on disposable shopping bags in 2012, however, officials said the intent was to change behavior, not to squeeze more pennies from taxpayers.

Plastic bags make up about a third of the trash found in the county’s streams and stormwater ponds. Many end up in the heavily polluted Anacostia River. Charging shoppers a nickel for each plastic or paper bag would prod them to embrace environmentally friendly reusable sacks, or so the county hoped.

Four years later, county data that tracks the impact of the bag tax offers conflicting evidence about whether it is having the desired effect.

Revenue from plastic-bag sales grew 3.2 percent from fiscal 2014 to 2015, according to a county analysis. Part of the growth is attributed to improved economic conditions, along with increases in population and the number of retail stores.

But part of it comes from more plastic and paper bags being issued at big-chain grocery stores such as Giant and Safeway — places where county officials had thought the tax would be most effective in reducing the use of disposable bags.

Safeway cashier Sheila Jones offers a free reusable bag to Jeff Bulman at a store in Bethesda after he spent more than $50 on groceries on the first day of the implementation of the bag tax in 2012. (Katherine Frey/THE WASHINGTON POST)

Convenience stores, pharmacies and department stores in Montgomery County had reductions in bag sales, however. And traps at 15 stream sites in the county monitored by the Metropolitan Washington Council of Governments show a decline in the number of plastic bags collected, from 856 in 2011 to 777 in 2015. The figure from the first half of 2016 shows an even steeper drop, to 281.

“I take that as a very positive message,” said county environmental protection director Lisa Feldt.

County Council member Roger Berliner (D-Bethesda), the chairman of the transportation and environment committee, said he finds it “troubling that we haven’t seen more of a decrease in the sales of bags, especially at grocery stores.”

Montgomery is one of several localities, including the District, New York, Boulder, Colo., and Brownsville, Tex., that have established bag taxes. Los Angeles, San Francisco and Seattle are among cities that have instituted outright bans.

The District’s nickel tax, which took effect in January 2010, has generated data similar to Montgomery County’s — a growth in revenue and a decline in bags recovered from monitoring traps, said Jeffrey Seltzer, associate director of stormwater management for D.C’s department of energy and environment. The District’s tax covers only establishments licensed to sell food.

A Washington Post investigation last year found that only about a third of the revenue from the D.C. tax was used for pollution control and watershed protection in the city. The rest went to staff salaries and education.

Since going into effect in January 2012, Montgomery’s tax has generated $10.4 million for pollution and stormwater control programs.

To spur more participation, County Executive Isiah Leggett (D) recently announced a renewed advertising and outreach effort, including a poster campaign (“Bring Your Bag”), bus and digital ads, and free bag distribution at county libraries.

“It’s not something a lot of people will do naturally,” Leggett said of the transition to reusable bags. “The public needs to be reminded.”

That includes Leggett, who recounted a recent trip to fill a prescription at a CVS near his Burtonsville home. After finishing up at the pharmacy counter, he grabbed some toothpaste, aspirin and other items before leaving.

When he got to the cash register, he realized that his cloth bag was in his car, he said. Rather than be spotted as a plastic bagger, Leggett carried his purchases to the parking lot without a bag.

“I’m not thinking of taking my bag into the pharmacy. That’s what happens,” Leggett said.

On a recent morning in downtown Silver Spring, the spotty compliance was in plain view. Heavy shoppers at Whole Foods and Safeway appeared to be more consistent users of reusable bags. Safeway patrons doing lighter shopping tended to leave toting one or two plastic sacks.

At Thai Market, a grocery and carryout restaurant on Thayer Avenue across from the Safeway, cabdriver William Zooma emerged with his lunch of drunken noodles in a carton wrapped in plastic.

Zooma, 52, said he uses cloth bags for his grocery shopping but doesn’t like them for carryout meals because of leaks or stains.

“It becomes just like trash,” he said.