diff -ru lame-3.96.1/doc/html/id3.html lame-3.96.1-malsyned.0/doc/html/id3.html
--- lame-3.96.1/doc/html/id3.html	2003-07-11 12:35:57.000000000 -0400
+++ lame-3.96.1-malsyned.0/doc/html/id3.html	2005-12-09 15:12:47.000000000 -0500
@@ -49,9 +49,8 @@
     <td align="LEFT" nowrap>additional info</td>
   </tr>
   <tr valign="TOP"> 
-    <td align="LEFT" nowrap><kbd>--tn "track&quot;</kbd></td>
-    <td align="LEFT" nowrap>track number of the song on the CD (1 to 255, creates 
-      an ID3 v 1.1 tag)</td>
+    <td align="LEFT" nowrap><kbd>--tn "track[/total]"</kbd></td>
+    <td align="LEFT" nowrap>audio/song track number and (optionally) the total number of tracks on the original recording.</td>
   </tr>
   <tr valign="TOP"> 
     <td align="LEFT" nowrap><kbd>--tg "genre"</kbd></td>
diff -ru lame-3.96.1/doc/man/lame.1 lame-3.96.1-malsyned.0/doc/man/lame.1
--- lame-3.96.1/doc/man/lame.1	2004-03-22 20:57:15.000000000 -0500
+++ lame-3.96.1-malsyned.0/doc/man/lame.1	2005-12-09 15:12:50.000000000 -0500
@@ -946,8 +946,10 @@
 .BI --tc " comment"
 user-defined text (max 30 chars for v1 tag, 28 for v1.1)
 .TP
-.BI --tn " track"
-audio/song track number (1 to 255, creates v1.1 tag)
+.BI --tn " track[/total]"
+audio/song track number and (optionally) the total number of tracks on 
+the original recording. (track and total each 1 to 255. Providing 
+just the track number creates v1.1 tag, providing a total forces v2.0).
 .TP
 .BI --tg " genre"
 audio/song genre (name or number in list)
diff -ru lame-3.96.1/frontend/parse.c lame-3.96.1-malsyned.0/frontend/parse.c
--- lame-3.96.1/frontend/parse.c	2004-06-26 11:46:27.000000000 -0400
+++ lame-3.96.1-malsyned.0/frontend/parse.c	2005-12-08 13:18:22.000000000 -0500
@@ -1401,6 +1401,7 @@
                     argUsed=1;
                     if( 0 == ignore_tag_errors ) {
                         if (nextArg && *nextArg) {
+                            char *tot = strchr(nextArg, '/');
                             int num = atoi(nextArg);
 
                             if ( num < 0 || num > 255 ) {
@@ -1409,6 +1410,18 @@
                                 }
                                 return -1;
                             }
+                            
+                            if (tot)
+                            {
+                                int tnum = atoi(++tot);
+                                
+                                if ( tnum < 0 || tnum > 255 ) {
+                                    if( silent < 10 ) {
+                                        fprintf(stderr, "The track count has to be between 0 and 255.\n");
+                                    }
+                                    return -1;
+                                }
+                            }
                          }
                     }
                     id3tag_set_track(gfp, nextArg);
diff -ru lame-3.96.1/libmp3lame/id3tag.c lame-3.96.1-malsyned.0/libmp3lame/id3tag.c
--- lame-3.96.1/libmp3lame/id3tag.c	2004-02-02 07:38:30.000000000 -0500
+++ lame-3.96.1-malsyned.0/libmp3lame/id3tag.c	2005-12-08 16:38:06.000000000 -0500
@@ -247,6 +247,7 @@
 {
     lame_internal_flags *gfc = gfp->internal_flags;
     if (track && *track) {
+	char *tot = strchr(track, '/');
         int num = atoi(track);
         if (num < 0) {
             num = 0;
@@ -260,6 +261,20 @@
             gfc->tag_spec.track = num;
             gfc->tag_spec.flags |= CHANGED_FLAG;
         }
+        if (tot) {
+            int tnum = atoi(++tot);
+            if (tnum < 0) {
+                tnum = 0;
+            }
+            if (tnum > 255) {
+                tnum = 255;
+            }
+            if (tnum) {
+                gfc->tag_spec.count = tnum;
+                /* The count field is only available in v2 tags. */
+                gfc->tag_spec.flags |= (CHANGED_FLAG | ADD_V2_FLAG);
+            }
+        }
     }
 }
 
@@ -392,7 +407,7 @@
             size_t encoder_length;
             char year[5];
             size_t year_length;
-            char track[3];
+            char track[8]; /* Worst case: "255/255" */
             size_t track_length;
             char genre[6];
             size_t genre_length;
@@ -437,7 +452,13 @@
                 tag_size += 15 + comment_length;
             }
             if (gfc->tag_spec.track) {
-                track_length = sprintf(track, "%d", gfc->tag_spec.track);
+                if (gfc->tag_spec.count) {
+                    track_length = sprintf(track, "%d/%d",
+                                           gfc->tag_spec.track,
+                                           gfc->tag_spec.count);
+                } else {
+                    track_length = sprintf(track, "%d", gfc->tag_spec.track);
+                }
                 tag_size += 11 + track_length;
             } else {
                 track_length = 0;
diff -ru lame-3.96.1/libmp3lame/id3tag.h lame-3.96.1-malsyned.0/libmp3lame/id3tag.h
--- lame-3.96.1/libmp3lame/id3tag.h	2002-12-08 12:02:19.000000000 -0500
+++ lame-3.96.1-malsyned.0/libmp3lame/id3tag.h	2005-12-08 13:26:54.000000000 -0500
@@ -22,6 +22,7 @@
     int year;
     const char *comment;
     int track;
+    int count; /* total tracks in collection */
     int genre;
 };
 
