Write-in votes are counted only if:
1) A candidate files a write-in declaration; and
2) Pays the filing fee if the declaration is filed less than 18 days before Election Day.
The following section of state law addresses when write-in votes are counted for a general election:
RCW 29A.60.021 (8): In a general election, if the total number of write-in votes cast for an office exceeds the number of votes cast for the candidate apparently elected to that office, then the individual write-in votes for each candidate who has filed a timely declaration of write-in candidacy must be canvassed and reported. Otherwise, individual tallying of write-in votes is not required.
For more information, the Office of the Secretary of State has an information sheet that addresses this in more detail.