Write a query in Python to count the total number of times a value appears in a specific column of a table.
Table: "mytable"
Column: "mycolumn"
Value: "myvalue"
SELECT COUNT(mycolumn)
    FROM mytable
    WHERE mycolumn = 'myvalue'