Turn on the television and there is U.S. Sen. Bob Casey (D., Pa.) of Scranton campaigning for a third term with a commercial touting his bipartisan record of working on legislation.

Change the channel and there is U.S. Rep. Lou Barletta, Casey's Republican challenger from Hazleton, with a campaign commercial knocking Casey as "Sleepin' Bob" and "one of the least effective senators."

One of the metrics Barletta, who has served four terms in the House, uses is how many times has Casey served as the primary sponsor of legislation signed into law.

The answer is four — all signed into law when President Barack Obama was in office.

How does Barletta measure up as the primary sponsor of legislation signed into law?

The answer is four — all also signed by Obama.

Casey has been in the Senate since 2007. Barletta joined the House in 2011. So Casey has had four more years in office to get things done, right?

That depends on how you factor in party control of Congress.

Casey and the Democrats had control of both the House and Senate for the first two years of his first six-year term. The Republicans took control of the House in 2011, as Barletta came into office. And Republicans took control of the Senate in 2015, leaving Casey in the minority party for the last three years.

Barletta, by comparison, has been in the majority for his four two-year terms in the House and his party has held majorities in both chambers for the last three years. In short, both men have had chances to pass legislation when their party was in full control of Congress.

And that's where they disagree on how to measure their records.

Casey says serving as a co-sponsor on meaningful legislation, even if a Republican is the primary sponsor, is the proper metric.

He cites as chief accomplishments legislation he pushed in 2013 to require uniform reporting of sexual assaults on college campuses and in 2016 to create tax-free savings accounts to help families pay for the care of relatives with long term disabilities.

"I think it's pretty clear that, when it comes to substantial legislation that I have led or worked on with a Republican as the second person, it's had a lot more impact on people's lives in Pennsylvania and nationwide than anything I can see that the congressman has enacted into law," Casey said, before aiming this zinger at Barletta: "I'm not sure we should be counting post offices as a great achievement."

That's a reference to one of the four pieces of legislation Barletta has had signed into law, a 2012 act renaming the post office in Pittston, a town of about 7,700 people in Luzerne County, for State Trooper Joshua D. Miller, who was killed in the line of service.

Casey has been co-sponsor of 59 bills signed into law — nine by President Trump, 41 by Obama and nine by President George W. Bush.

Barletta has been co-sponsor for 50 bills signed into law — 11 by Trump and 39 by Obama.

Barletta cites his support for funding for a three-county after-school program that focuses on a curriculum of science, technology, engineering, arts and mathematics along with his 2013 intervention in a medical case involving the denial of a lung transplant for a cystic fibrosis patient who, at 10 years of age, was too young to qualify.

He rejects Casey's emphasis on co-sponsoring legislation and claims the Senate, with 100 members, is an easier place to find legislative success than the House, where there are 435 members.

“It’s nothing to co-sponsor a bill,” Barletta said. “You could sleep all day and still co-sponsor all day. I think I’ve accomplished more legislatively.”