When Hamilton Academical is the Opponent, what is the total Attendance?
CREATE TABLE "scottish_cup" (
  "round" text,
  "date" text,
  "opponent" text,
  "score" text,
  "aberdeen_scorer_s" text,
  "attendance" real,
  "report" text
);
SELECT COUNT("attendance") FROM "scottish_cup" WHERE "opponent"='hamilton academical';