von der MongoDb-Website siehe "Felder in eingebetteten Dokumenten festlegen"
To specify a <field> in an embedded document or in an array, use dot notation.
For the document matching the criteria _id equal to 100, the following
operation updates the make field in the details document:
db.products.update(
{ _id: 100 },
{ $set: { "details.make": "zzz" } })
in Ihrem Fall
db.collection.update(
{_id:ObjectId("1")},
{ $set: { "occurrences.12": "3", "occurrences.17": "2" }})