Help Pac-Man count the Pac-Dots
Pyth, 356 345 + 1 = 346 bytes

The code contains some unprintables, so here is the reversible xxd hexdump.

0000000: 4a4b 304c 2c3d 2b4b 4062 4a58 624a 3041  JK0L,=+K@bJXbJ0A
0000010: 2c63 6a43 2201 e120 49b4 efbc e267 27f4  ,cjC".. I....g'.
0000020: a11b f5d5 7f79 d1a0 ab8a 7689 449f 0c50  .....y....v.D..P
0000030: b2d4 7c30 99c3 368e aa67 4213 ab9b d276  ..|0..6..gB....v
0000040: d75f 6e99 5757 04a6 08cc 99d0 7141 3d2f  ._n.WW......qA=/
0000050: d854 7cf7 4a70 954e 6e35 f9b9 e0c5 1d53  .T|.Jp.Nn5.....S
0000060: 36d5 63f9 cf13 0f66 c113 4dec 956e 5225  6.c....f..M..nR%
0000070: b14a 1659 dcb5 6822 3534 2034 6a43 2203  .J.Y..h"54 4jC".
0000080: ffe3 8fff 2232 3d59 636a 4322 0b8a 4624  ...."2=YcjC"..F$
0000090: 7815 4a94 192c 79f6 d6e5 e098 5e97 76bc  x.J..,y.....^.v.
00000a0: 23cf 027c 35c5 5098 2a83 68f1 823a 83f6  #..|5.P.*.h..:..
00000b0: dfa4 7e12 443f 0257 7adb ab2d 8e6f 1199  ..~.D?.Wz..-.o..
00000c0: 9a3e 3f9d a524 d331 c5ff 94ae e5a2 3507  .&gt;?..$.1......5.
00000d0: bd22 3334 2032 3d6b 2b30 6a43 2202 25f2  ."34 2=k+0jC".%.
00000e0: f55c 2252 c250 0002 c250 0000 065c 225c  .\"R.P...P...\"\
00000f0: 2247 5289 3698 4227 5350 8822 3136 3d64  "GR.6.B'SP."16=d
0000100: 636a 4322 8223 a80e 5c22 981d d272 729d  cjC".#..\"...rr.
0000110: d88d 981d 5c22 5c22 2bd7 91dd 9428 73d7  ....\"\"+....(s.
0000120: 1dd7 2234 2032 5651 2079 483d 547e 4a40  .."4 2VQ yH=T~J@
0000130: 4047 4a2b 5a78 2246 5242 4c22 4e20 796b  @GJ+Zx"FRBL"N yk
0000140: 3d5a 4040 647e 4a40 4059 4a3d 5421 7840  =Z@@d~J@@YJ=T!x@
0000150: 594a 5454 2968 7948 0a                   YJTT)hyH.




Requires the -M flag to disable memoization. Unfortunately, this can't be done in any online executor I know of.

Here is a readable printable ASCII version:

JK0L,=+K@bJXbJ0A,cj746957013238413906925468440008893181365431681519974815772691846219267045007717553452313017550830370829477591340658010575885616582299429376501117428763541235628345630376341520044712982918668584832091126800263024965443560007480163218792 54 4j17178005503 2=Ycj664551201217474826979459068682259492333017695780569003557724234375880492114440213266014621594427584622393511454741615093293082181365458295035985321888753898774398909 34 2=k+0j883734055588186287049718559289059922762611092840989558085734536 16=dcj53536195844172273707047543644202986760006840011986146398708374999 4 2VQ yH=T~J@@GJ+Zx"FRBL"N yk=Z@@d~J@@YJ=T!x@YJTT)hyH


Explanation

This is very much work in progress, so I won't post a complete explanation yet.

Basically, the program represents the board as a (somewhat weird) graph using five lookup tables: 2 for connectivity, 1 for junction directions, and 2 for dot counts. This was built by a 200-line Python script I spent way too many hours on. Then the program just walks through the input and counts the dots, updating the dot tables to zero as the dots are collected.

TODO:


Write Python routine for reordering the nodes until the lookup table contains as few escape-requiring characters as possible
Try to remove section handling altogether (should remove one lookup table)


UPDATE: tried this, seems to not remove the table and lengthen code

Rewrite Pyth-side logic (the current one isn't very golfed)


UPDATE: somewhat done, code's still imperfect