Postal unions began counting ballots on ratification of a controversial new contract yesterday as union officials hedged their bets on chances of averting an illegal mail strike later this month.

Officials are still predicting ratification but by a narrow margin than appeared likely before the contract was spurned by convention of the two largest postal unions and criticized by AFL-CIO President George Meany.

"So many people have gotten in the act that I'd hate to speculate," said James LaPenta of the Mailhandlers Division of the Laborers International, who was secretary of the bargaining committee that negotiated the tentative agreement with the Postal Service last month.

Federal law bans strikes and calls for government fact-finding and arbitration if bargaining reaches an impasse, but the situation is clouded by hardline conventions of the two largest unions the American Postal Workers Union and the National Association of Letter Carriers.

Both unions mandate a strike if the Postal Service refused to return to bargaining table within 5 days or a failed to deliver a new contract within the next 15 days. So far Postmaster General William F. Bolger has the bargaining table within 5 days or been adamant in saying he will not go back to the table.

Even if the contract is rejected, officials on both sides say there may be ways of avoiding an all-out work stoppage but one union official conceded, "It could be a real mess." The Postal Service has strike contingency plans, developed earlier this summer, that includes moving the mails with federal troops.

A final ballot count from the three biggest unions is expected by the weekend: within the next couple of days from the APWU. Voting by the Rural Letter Carriers, the smallest of the unions, will be conducted later by its state officers.

The rural carriers and mailhandlers are expected to ratify by large margins, but the bigger unions are in some doubt, with opposition running strongest in big city locals. A strike, or at least a snarling of mail service, is possible if only one union rejects the pact while the others approve it.

The proposed new three year contract preserves the unions' "no-layoffs" guarantee but provides for an increase of only 91.5 percent in wages and cost of living adjustments over three years, considerably lower than most other unions have won recently. It was the pay provision that drew fire from Meany, who described it as insufficient and predicted that the unions' members would reject the package.