need better db design for project
I think the Notes table is missing a userID FK column (and put an index on it)
You need to identify the owner of the Note  

The UserNotes table does not need an ID
just:   

NoteID || UserId


That is a sufficient composite PK
And I would do it in that order for quick counting NoteID
select count(*) from UserNotes where NoteID = X would be very very fast  

So what 1000 x 1000 rows.  You have 1000 x 1000 unique relationships.  It is just two Int.  

One trick is have a UserID Public ID 0 for all  

Just a preference but I don't use plural in a table name
Tables are used to store many rows