Call it the new math, Republican style.

In their first real scrimmage with the General Assembly, Gov. Robert L. Ehrlich Jr. and his Republican aides have had a surprisingly difficult time counting the votes.

First, Ehrlich thought he had enough votes to win a key committee vote last week on his nominee for environmental secretary Lynn Buhl, a former auto industry lawyer and state regulator from Michigan. But he and his lobbyists were caught flat-footed when two Democratic senators switched their votes, and the committee vetting nominations voted 10 to 9 against Buhl.

Then came the floor fight Tuesday. Ehrlich, Maryland's first Republican governor in more than three decades, knew he had the Senate's 14 Republicans on his side. But he needed to pick off at least 10 Democratic votes to secure Buhl's appointment and avoid becoming the first governor in Maryland history to have a Cabinet nominee rejected by the full Senate.

As late as Monday night, Ehrlich and his Buhl boosters said they were only two votes short of victory in the 47-member chamber. They had turned down a compromise with environmentalists that would have left Buhl in limbo for a year. And they were targeting two Democrats to woo.

Sen. Brian E. Frosh was keeping his own count. Frosh, a liberal Montgomery County Democrat who led the fight against Buhl, spent much of the weekend and Monday whipping the Senate into a lather. Monday night, he was predicting victory, as long as the powerful Senate president, Thomas V. Mike Miller Jr. (D-Prince George's), delivered a vote against Buhl.

Miller obliged, and Buhl's nomination went down, 26 to 21.

Warm, Fuzzy, Partisan

The rededication of the newly renovated state Senate office buildings last Friday was supposed to be a bipartisan affair at which differences could be put aside.

Miller presided. Sitting in the audience, across the aisle from each other, were Ehrlich and House Speaker Michael E. Busch (D-Anne Arundel), who is opposing a plan pushed by Ehrlich and Miller to legalize slot machines in Maryland.

But Rep. Steny H. Hoyer (D-5th District) couldn't resist a partisan joke during the otherwise warm-and-fuzzy ceremony.

Ehrlich campaigned on his vow to restore fiscal responsibility to the state, which faces a record budget shortfall. Turning to Ehrlich during a speech, Hoyer quipped that the congressman-turned-governor had left a heck of a budget mess behind him when he left Washington for Annapolis.

Ehrlich merely laughed.

Taylor Still Stuns

Former House speaker Casper R. Taylor Jr. stunned some Annapolis observers when he signed on to help Ehrlich work a recalcitrant House of Delegates to pass his bill to legalize slot machines at four Maryland racetracks and broker a compromise on the budget.

After all, Taylor, an Allegany County Democrat, is the mentor of Busch, the proposal's most vocal opponent. Taylor said in an interview that his views on slots and Busch's aren't all that far apart. Taylor is pushing for a referendum, which would put the proposal before voters, an idea Busch has said he would consider.

Taylor said he thinks Busch welcomes his involvement. The two men continue to talk regularly, meeting for dinner and speaking by phone, Taylor said.

Busch said the two men remain close. But he said it is difficult for Taylor, who lost his seat in last year's election, to be enormously effective in the current debate because he is on the outside of a chamber where many of the members are new.