Ballots cast at the District of Columbia's Nov. 7 general election will be counted in the old Pension Building on Judiciary Square, the D. C. Board of Elections and Ethics decided yesterday.

The 95-year-old red black building has a central enclosed courtyard with ample space to set up ballotcounting machinery, board officials said. The structure was recently vacated by the D. C. Superior Court.

Ballots cast at the Sept. 12 primary election were counted in cramped quarters in the Martin Luther King Memorial Library.

In deciding on the changed location, the board ordered television cameras banned from the counting area and restricted to special interview rooms.

Jeanus B. Parks Jr., a board member, said the counting procedure was disrupted by bright lights and by television "wires and cables that I have seen people tripping over." Televisions stations "turned around and gave us the business" with critical coverage of delays and confusion they helped create, Parks said.

At yesterday's special meeting, the electoral board also voted to seek to retain Al Gollin, a public affairs and election expert, as a consultant to work with staff officials on planning for a trouble-free election. In the primary, Gollin aided the mayoral nomination campaign of Sterling Tucker, who was defeated.